// Copyright [2020] <unknown>
#include <bits/stdc++.h>
using namespace std;
#define ONLINE_JUDGE
#ifndef ONLINE_JUDGE
#define dbg(x...) { cerr << "\033[32;1m" << #x << " -> "; err(x); }
void err() { cerr << "\033[39;0m" << endl; }
template<typename T, typename... A>
void err(T a, A... x) { cerr << a << ' '; err(x...); }
#else
#define dbg(...)
#endif

#define sz(x) ((int)x.size())

typedef long long LL;

int t, n;

const int N = 5e3 + 50, M = 5e3 + 50;

int m, a[N], cost[N], c[M];

int dp[M][N];

int mx[M];
// segT<int> seg;

inline void update(int &a, int b) {
    a = max(a, b);
}


int main(int argc, char const *argv[]) {
    // code

    scanf("%d%d", &n, &m);

    for (int i=1; i<=n; ++i) {
        scanf("%d", &a[i]);
    }

    for (int i=1; i<=n; ++i)
        scanf("%d", &cost[i]);

    for (int i=1; i<=n+m; ++i)
        scanf("%d", &c[i]);

    reverse(a+1, a+n+1);
    reverse(cost+1, cost+n+1);
    const int INF = 0x3f3f3f3f;
    for (int i=0; i<=n+m+10; ++i)
        for (int j=0; j<=n+10; ++j)
            dp[i][j] = -INF;

    dp[0][0] = 0;
    mx[0] = 0;
    // return 0;

    for (int i=1; i<=n; ++i) {
        for (int j=n; j>=2; --j) {
            update(dp[a[i]][j], dp[a[i]][j-1] + c[a[i]] - cost[i]);
        }

        update(dp[a[i]][1], mx[a[i]-1] + c[a[i]] - cost[i]);
        update(mx[a[i]], dp[a[i]][1]);
        
        

        int lim = (n) / 2, j;
        for (j=a[i]+1; j<=n+m && lim; ++j, lim>>=1) {
            
            update(mx[j], mx[j-1]);
            // dbg(mx[j]);
            for (int k=1; k<=lim; ++k) {
                update(dp[j][k], dp[j-1][k*2] + k * c[j]);
                update(dp[j][k], dp[j-1][k*2+1] + k * c[j]);
                // update(mx[j], dp[j][k]);
            }
            update(mx[j], dp[j][1]);
        }
        for (; j<=n+m; ++j)
            update(mx[j], mx[j-1]);

        dbg(dp[5][1], dp[4][2], dp[4][1], mx[a[i]-1], dp[1][2])        
    }


    int ans = 0;
    for (int i=1; i<n+m; ++i) {
        // for (int j=1; j<=n; ++j) {
        //     update(ans, dp[i][j] + (j/2) * c[i+1]);
        // }
        update(ans, dp[i][1]);
    }
    update(ans, dp[n+m][1]);
    cout << ans << endl;
    return 0;
}
